package com.doit.demo02;

import java.util.ArrayList;

public class test02_Integer {
    public static void main(String[] args) {
        //int---Integer 装箱
        Integer in = new Integer(10);
        System.out.println(in.intValue()*2);//拆箱

        //int------Integer 自动装箱
        Integer in2 = 10;
        //Integer ---int自动拆箱
        int i2 = in2;
        System.out.println(i2);

        ArrayList<Integer>list = new ArrayList<>();

        list.add(new Integer(10));
        list.add(10);//自动装箱

        Integer in3 = list.get(0);
        int num = list.get(0);//自动拆箱

        list.remove(new Integer(10));
        System.out.println(list.get(0));

        Boolean b = new Boolean(true);
        System.out.println(b.booleanValue());
    }
}
